<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', 'MainController@home');
Route::get('test', 'MainController@test');
Route::get('dashboard', 'MainController@index');
Route::post('login', 'MainController@login');
Route::get('logout', 'MainController@logout');
Route::get('storage/containers','BlobsController@listContainers');
Route::post('container/create','BlobsController@createContainer');

Route::post('container/delete','BlobsController@deleteContainer');
Route::post('blob/upload','BlobsController@uploadBlob');
Route::post('blob/delete','BlobsController@deleteBlob');
Route::get('container/{container}','BlobsController@listBlobs');
Route::get('table/{tableName}/{partitionKey}','TablesController@viewEntities');


//Routes Related to Tables only
Route::get('tables','TablesController@index');
Route::get('entity/create','TablesController@createEntity');

Route::post('entity/create/{tableName}/{partitionName}','TablesController@createEntityProcess');
Route::post('entity/delete/{tableName}/{partitionKey}/{rowKey}','TablesController@deleteEntity');
Route::get('entity/edit/{tableName}/{partitionKey}/{rowKey}','TablesController@editEntity');
Route::post('entity/edit/process','TablesController@editEntityProcess');


Route::get('entity/get/{tableName}/{partitionName}','TablesController@getEntities');
Route::post('entity/get/{tableName}/{partitionName}','TablesController@getEntitiesAjax');
Route::post('table/create','TablesController@createTable');

Route::get('home', 'HomeController@index');

Route::controllers([
	'auth' => 'Auth\AuthController',
	'password' => 'Auth\PasswordController',
]);



// ROutes related to queues should be listed here
Route::get('queue','QueueController@index');

Route::get('queue/create','QueueController@create');
Route::get('queue/delete','QueueController@delete');

Route::post('queue/create/{queue}','QueueController@createQueueProcess');
Route::post('queue/addmessage','QueueController@addMessage');
Route::post('queue/dequeuemessage','QueueController@dequeueMessage');
Route::post('queue/deletequeue','QueueController@deleteQueue');
Route::get('queue/peek/{queueName}/{numMessages}','QueueController@queuePeekMessages');